From: Domas Mituzas Date: Thu, 15 Feb 2007 15:39:21 +0000 (+0000) Subject: run a LinksBatch pass on all links being printed. X-Git-Tag: 1.31.0-rc.0~54039 X-Git-Url: http://git.cyclocoop.org/%28%5B%5E/404?a=commitdiff_plain;h=1a9baea5e1a76995bc1fc5626b2d623691dcc60e;p=lhc%2Fweb%2Fwiklou.git run a LinksBatch pass on all links being printed. --- diff --git a/includes/SpecialCategories.php b/includes/SpecialCategories.php index dfedcc5bd3..93362146c2 100644 --- a/includes/SpecialCategories.php +++ b/includes/SpecialCategories.php @@ -29,9 +29,25 @@ class CategoryPager extends AlphabeticPager { return "cl_to"; } + function getBody() { + if (!$this->mQueryDone) { + $this->doQuery(); + } + $batch = new LinkBatch; + $db = $this->mDb; + + $this->mResult->rewind(); + + while ( $row = $this->mResult->fetchObject() ) { + $batch->addObj( Title::makeTitleSafe( NS_CATEGORY, $row->cl_to ) ); + } + $batch->execute(); + $this->mResult->rewind(); + return parent::getBody(); + } + function formatRow($result) { global $wgLang; - $title = Title::makeTitle( NS_CATEGORY, $result->cl_to ); return ( '
  • ' .